home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part1 / 3531 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.games,comp.sys.amiga.hardware,comp.sys.amiga.misc,comp.sys.amiga.graphics
  4. Subject: Re: FPU and games?
  5. Date: 30 Jan 1996 04:31:07 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4ek6ub$mrq@maureen.teleport.com>
  8. References: <38232041@kone.fipnet.fi> <volker.0ed8@vb.franken.de> <38232075@kone.fipnet.fi> <volker.0ehd@vb.franken.de> <38232112@kone.fipnet.fi> <volker.0en5@vb.franken.de> <38232154@kone.fipnet.fi> <wfblanDLozuJ.64s@netcom.com>
  9. NNTP-Posting-Host: kelly.teleport.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Wells Fargo Bank (wfblan@netcom.com) wrote:
  13. : Jyrki Saarinen (jsaarinen@kone.fipnet.fi) wrote:
  14.  
  15. : : > It is. fmove.l fpx,dy converts an 80bit floating point number to a
  16. : : > 32bit signed integer.
  17.  
  18. : : Ok, great. I stupidly thought that fint is needed when it was
  19. : : not. 
  20.  
  21. : : Now, I can see how FPU can be used in perspective correct
  22. : : texture mapping. Everything could be fitted into registers..
  23.  
  24. : : Hmm. I tested a loop like this:
  25.  
  26. : :     fmove    fp2,fp6        ;v<<8/z
  27. : :     fmove    fp0,fp7        ;u/z
  28. : :     fdiv    fp4,fp6        ;v<<8 = v<<8/z / 1/z
  29. : :     fdiv    fp4,fp7        ;u = u/z / 1/z
  30. : :     fmove.l    fp6,d0
  31. : :     fmove.b    fp7,d0
  32. : :     move.b    (a0,d0.l),(a1)+
  33. : :     fadd    fp2,fp3        ;v/z+=v/z step
  34. : :     fadd    fp0,fp1        ;u/z+=u/z step
  35. : :     fadd    fp5,fp4        ;1/z+=1/z step
  36.  
  37. : : Now, with those fmoves to data registers this loop
  38. : : was very slow. Any reason why? Without those fmoves
  39. : : this loop was about the clock cycles the 040 manual
  40. : : tells.
  41.  
  42. : : --                               _
  43. : : a Stellar programmer          _ //
  44. : : "Amiga - back for the future" \X/
  45.  
  46.  
  47. : So am I correct to understand that you are saying that using the above loop
  48. : without the fmoves, it is pheasable to use the 040's FPU to improve texture
  49. : maped games and programs?  And wouldn't this be all the more true on an 060?
  50.  
  51.  The above on a 040 should be ~36 cycles (I'm gessing based on the 
  52.  fact that the major fpu inst take 2 head/  tail cycle) without the memory 
  53.  move, but I can see a gouraud shading interger code fitting in the 18
  54.  possible tail  cycle. So perspective corrected texture mapping+gouraud
  55.  lighting in ~40  cycles, nice but about 5 to 10 time slower then constant
  56.  Z lighted texture mapping (like "In the shaow" use for the scenery).
  57.  
  58.  Stephan
  59.